package simple14.discount;

public class MultyDiscount implements Discount{
    protected MultyDiscount nextMultyDiscount;

    public MultyDiscount(MultyDiscount nextMultyDiscount) {
        this.nextMultyDiscount = nextMultyDiscount;
    }

    @Override
    public int calculate(int money) {
        if (this.nextMultyDiscount != null){
            return  this.nextMultyDiscount.calculate(money);
        }
        return money;
    }
}
